import service from '@/utils/request'
import {userStore} from "@/store/modules/user";

export function useGetGPSToken(){
    return service.get('/gps/token')
}

export function useGetTrackPosApi(data: any){
    const user = userStore()
    return service.get("/gps/driver/trackPos", {
        params: data,
        headers: {
            "Gps-Token": user.gpsToken
        }
    })
}

export function useRouteingSaveApi(data: any){
    const user = userStore()
    return service.post("/gps/geofence", data,{
        headers: {
            "Gps-Token": user.gpsToken
        }
    })
}

export function useGetRouteingInfoApi(id: string){
    const user = userStore()
    return service.get("/gps/geofence/info/" + id,{
        headers: {
            "Gps-Token": user.gpsToken
        }
    })
}

